<?php include 'head.htm';
require_once '../yubiphpbase/appinclude.php';
$loggedIn = false;
$cookieExists = false;
if (($usrid = getUsrIdFromSession()) > 0) {
	$loggedIn = $cookieExists = true;
	setcookie('usrid', myEnc($usrid, $SESS_SALT), time() + A_MONTH_IN_SECS);
} else if (($usrid = getUsrIdFromCookie()) > 0) {
	$cookieExists = true;
}
//echo 'usrid:'.$usrid.' loggedIn:'.$loggedIn.' cookieExists:'.$cookieExists;
if (isset($_SESSION['alert'])) {
	$alert = $_SESSION['alert'];
	unset($_SESSION['alert']);
} else {
	$alert = '';
}
?>

<title>Enter Yubikey Management System</title>

<body onload="focusInput();">

<div id="container">
<?php include 'header.php'; ?>

<div class="infocontainer">

<?php showAlert($alert); ?>

<div align=center id="R">
<form method=post id=loginbykey name=loginbykey action=yubi_login.php>

<table>

<tr>

<td>
<span class="headerText">
Insert your Yubikey to the USB port.
Touch the Yubikey button.</span>
<p>
<input name=otp size=70 maxlength=300 class=y_input></form></td>

</tr>

<tr><td align=center><font size=2>
Not registered yet? <a href=signup.php>Register here >></a>
</td></tr>

</table>
</div>

